import React ,{ Suspense, lazy }from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
// import App from './App';
import reportWebVitals from './reportWebVitals';
import router from './router';
import { RouterProvider, } from 'react-router-dom';
import { Provider } from 'react-redux';
import store from './store';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale/zh_CN';
const root = ReactDOM.createRoot(document.getElementById('root'));

console.warn=function(){}
root.render(
  <React.StrictMode>

{/* <Suspense fallback={<div>Loading.....</div>}> */}
  
    {/* 汉化 */}
     <ConfigProvider locale={zhCN}>
      {/* 状态管理 */}
   < Provider store={store}>
    {/* 路由挂载全局 */}
   <RouterProvider router={router}></RouterProvider>
   </Provider>
   </ConfigProvider> 
   
   
    {/* </Suspense> */}
  </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
